package cn.ht.bootdemo.common.utils;

import cn.ht.bootdemo.common.entity.ResultVo;
import cn.ht.bootdemo.common.enums.ResponseStatusEnum;

import java.io.Serializable;

/**
 * @author ht
 * @Description:
 * @date 2020-5-13
 */
public class R implements Serializable {

    private static final long serialVersionUID = 1L;

    public static ResultVo success(){
        return new ResultVo(ResponseStatusEnum.SUCCESS.getStatus(), ResponseStatusEnum.SUCCESS.getMessage(),null);
    }

    public static ResultVo success(Object obj){
        return new ResultVo(ResponseStatusEnum.SUCCESS.getStatus(), ResponseStatusEnum.SUCCESS.getMessage(),obj);
    }

    public static ResultVo build(Integer Code, String message, Object obj){
        return new ResultVo(Code,message,obj);
    }
}
